package com.arofoxmsn.model.comunication;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.arofoxmsn.model.profile.Profile;

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public abstract class AbstractComunicationMedia {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name = "id", unique = true, nullable = false)
	private long id;
	
	@Column(name = "description", nullable = false, length = 50)
	private String description;
	
	@ManyToOne
	@JoinColumn(name="profile_id")
	private Profile profile;
	
	public long getId() {return id;}
	public void setId(long id) {this.id = id;}
	
	public String getDescription() {return description;}
	public void setDescription(String description) {this.description = description;}
	
	public Profile getProfile() {return profile;}
	public void setProfile(Profile profile) {this.profile = profile;}

}
